import Vue from 'vue'
import Router from 'vue-router'

import essentialInformation from './views/essentiallnformation'
import listOfGoods from './views/listOfGoods'
import classification from './views/classification'
import orderManagement from './views/orderManagement'
import evaluationManagement from './views/evaluationManagement'
import refund from './views/refund'
import commodityAnalysis from './views/commodityAnalysis'
import financialOverview from './views/financialOverview'
import useDisplay from './views/useDisplay'
import role from './views/role'
import power from './views/power'
import useManagement from './views/useManagement'
import orderDelivery from './views/orderDelivery'
import dataOverview from './views/dataOverview'
import orderDetails from './views/orderDetails'
import publishGoods from './views/publishGoods'
import login from './views/login'
import Index from './views/index'
Vue.use(Router);

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      component:login
    },
      {
        path:'/index',
          component: Index,
          children:[
              {
                  path: 'orderDetails',
                  component:orderDetails
              },
              {
                  path: 'role',
                  component:role
              },
              {
                  path: 'publishGoods',
                  component:publishGoods
              },
              {
                  path: 'orderDelivery',
                  component:orderDelivery
              },
              {
                  path: 'essentialInformation',
                  component:essentialInformation
              },
              {
                  path: '/',
                  component:dataOverview
              },
              {
                  path: 'listOfGoods',
                  component: listOfGoods
              },
              {
                  path: 'classification',
                  component: classification
              },
              {
                  path: 'orderManagement',
                  component: orderManagement
              },
              {
                  path: 'evaluationManagement',
                  component: evaluationManagement
              },
              {
                  path: 'refund',
                  component: refund
              },
              {
                  path: 'commodityAnalysis',
                  component: commodityAnalysis
              },
              {
                  path: 'financialOverview',
                  component: financialOverview
              },
              {
                  path: 'power',
                  component: power
              },
              {
                  path: 'useDisplay',
                  component: useDisplay
              },
              {
                  path: 'useManagement',
                  component: useManagement
              }
          ]
      }

  ]
})
